package com.yellowpage.bigdata.data;

import javax.persistence.*;
import java.sql.Date;

/**
 * Created by mac on 15/11/6.
 */
@Entity
@Table(name = "tm_apponoff_new_user_month", schema = "", catalog = "omc")
public class TmApponoffNewUserMonthEntity {
    private int tmApponoffNewUserMonthId;
    private String areacode;
    private String operator;
    private String channelno;
    private Integer uvImei;
    private Date createTime;
    private String monthId;

    @Id
    @Column(name = "TM_APPONOFF_NEW_USER_MONTH_ID")
    public int getTmApponoffNewUserMonthId() {
        return tmApponoffNewUserMonthId;
    }

    public void setTmApponoffNewUserMonthId(int tmApponoffNewUserMonthId) {
        this.tmApponoffNewUserMonthId = tmApponoffNewUserMonthId;
    }

    @Basic
    @Column(name = "AREACODE")
    public String getAreacode() {
        return areacode;
    }

    public void setAreacode(String areacode) {
        this.areacode = areacode;
    }

    @Basic
    @Column(name = "OPERATOR")
    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    @Basic
    @Column(name = "CHANNELNO")
    public String getChannelno() {
        return channelno;
    }

    public void setChannelno(String channelno) {
        this.channelno = channelno;
    }

    @Basic
    @Column(name = "UV_IMEI")
    public Integer getUvImei() {
        return uvImei;
    }

    public void setUvImei(Integer uvImei) {
        this.uvImei = uvImei;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "MONTH_ID")
    public String getMonthId() {
        return monthId;
    }

    public void setMonthId(String monthId) {
        this.monthId = monthId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TmApponoffNewUserMonthEntity that = (TmApponoffNewUserMonthEntity) o;

        if (tmApponoffNewUserMonthId != that.tmApponoffNewUserMonthId) return false;
        if (areacode != null ? !areacode.equals(that.areacode) : that.areacode != null) return false;
        if (operator != null ? !operator.equals(that.operator) : that.operator != null) return false;
        if (channelno != null ? !channelno.equals(that.channelno) : that.channelno != null) return false;
        if (uvImei != null ? !uvImei.equals(that.uvImei) : that.uvImei != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (monthId != null ? !monthId.equals(that.monthId) : that.monthId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = tmApponoffNewUserMonthId;
        result = 31 * result + (areacode != null ? areacode.hashCode() : 0);
        result = 31 * result + (operator != null ? operator.hashCode() : 0);
        result = 31 * result + (channelno != null ? channelno.hashCode() : 0);
        result = 31 * result + (uvImei != null ? uvImei.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (monthId != null ? monthId.hashCode() : 0);
        return result;
    }
}
